# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=spi-tools
pkgver=0.8.4
pkgrel=0
pkgdesc="simple command line tools to help using Linux spidev devices"
url="https://github.com/cpb-/spi-tools"
arch="all !s390x !ppc64le"
license="GPL-2.0-or-later"
makedepends="autoconf automake linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cpb-/spi-tools/archive/$pkgver.tar.gz"

build() {
	autoreconf -fim
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="b508445150c0fb3a7a877dc76e02e3af4cda63baf59a8bf5beb227beb44e92283709c6b68960d2123b954580f78d7001b2d49e2412b1ee5666cc616f47804e6b  spi-tools-0.8.4.tar.gz"
